package Client;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;




public class Main{

	public static void main(String[] args) {


		try{

			Socket s = new Socket("130.132.135.109", 8080);
			while(true)
			{
				BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				BufferedReader br2 = new BufferedReader(new InputStreamReader(s.getInputStream()));
				BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));

				String line = br.readLine();
				bw.write(line);
				bw.newLine();
				bw.write("END");
				bw.newLine();
				bw.flush();
				String word = br.readLine();
				
				String total = "";
				
				while (word != null)
				{
					total += word;
					word = br.readLine();
				}
				
				System.out.println(total);
				bw.close();
			}

		}
		catch(IOException e){

			System.out.println("error:" + e.getMessage());
		}
	}

}